Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YARN-7237: Enable asynchronous scheduling by default for capacity scheduler #7138

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

shameersss1
Copy link
Contributor

@shameersss1 shameersss1 commented Oct 31, 2024

Description of PR

Enable asynchronous scheduling by default for capacity scheduler.

This commit enables asynchronous scheduling by changing the config default value to true. Additionally the commit also adds documentation changes for different scheduling strategies.

Note: Although asynchronous scheduling is enabled by default, for unit testing disabling it by default to give more control over container scheduling while simulating complex tests (i.e synchronous scheduling gives more control over when to schedule the container for simulating certain cases while writing unit test).

How was this patch tested?

Existing Unit Tests

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@shameersss1
Copy link
Contributor Author

Submitted a first cut PR to trigger unit tests for Yarn capacity scheduler with async scheduling.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 33s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 14m 40s Maven dependency ordering for branch
+1 💚 mvninstall 34m 11s trunk passed
+1 💚 compile 8m 11s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 7m 23s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 2m 2s trunk passed
+1 💚 mvnsite 1m 53s trunk passed
+1 💚 javadoc 1m 45s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 41s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+0 🆗 spotbugs 0m 36s branch/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 38m 49s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for patch
+1 💚 mvninstall 1m 6s the patch passed
+1 💚 compile 7m 20s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 7m 20s the patch passed
+1 💚 compile 7m 18s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 7m 18s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 48s the patch passed
+1 💚 mvnsite 1m 43s the patch passed
+1 💚 javadoc 1m 29s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 29s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+0 🆗 spotbugs 0m 34s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site has no data from spotbugs
+1 💚 shadedclient 39m 36s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 159m 1s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 30s hadoop-yarn-site in the patch passed.
+1 💚 asflicense 0m 58s The patch does not generate ASF License warnings.
344m 36s
Reason Tests
Failed junit tests hadoop.yarn.server.resourcemanager.scheduler.capacity.TestContainerResizing
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestLeafQueue
hadoop.yarn.server.resourcemanager.scheduler.TestSchedulingWithAllocationRequestId
hadoop.yarn.server.resourcemanager.TestRMRestart
hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesCapacitySched
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerAutoQueueCreation
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerSchedulingRequestUpdate
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestSchedulingRequestContainerAllocationAsync
hadoop.yarn.server.resourcemanager.TestResourceManager
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerLazyPreemption
hadoop.yarn.server.resourcemanager.TestNodeBlacklistingOnAMFailures
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCSAllocateCustomResource
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestNodeLabelContainerAllocation
hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesSchedulerActivities
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerOvercommit
hadoop.yarn.server.resourcemanager.TestOpportunisticContainerAllocatorAMService
hadoop.yarn.server.resourcemanager.TestResourceTrackerService
hadoop.yarn.server.resourcemanager.TestRM
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestApplicationLimitsByPartition
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerApps
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestReservations
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestSchedulingRequestContainerAllocation
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerNodes
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerWeightMode
hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesForCSWithPartitions
hadoop.yarn.server.resourcemanager.ahs.TestRMApplicationHistoryWriter
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerMultiNodes
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerSurgicalPreemption
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestContainerAllocation
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerAutoCreatedQueuePreemption
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerWithMultiResourceTypes
hadoop.yarn.server.resourcemanager.TestRMHA
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacitySchedulerMultiNodesWithPreemption
hadoop.yarn.server.resourcemanager.TestWorkPreservingRMRestart
hadoop.yarn.server.resourcemanager.scheduler.capacity.TestCapacityScheduler
hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesSchedulerActivitiesWithMultiNodesEnabled
hadoop.yarn.server.resourcemanager.scheduler.TestSchedulerHealth
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7138/1/artifact/out/Dockerfile
GITHUB PR #7138
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets markdownlint
uname Linux 054a961d9966 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / b593898
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7138/1/testReport/
Max. process+thread count 1393 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7138/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 7m 16s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+0 🆗 markdownlint 0m 1s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 13m 53s Maven dependency ordering for branch
+1 💚 mvninstall 18m 43s trunk passed
+1 💚 compile 3m 43s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 3m 24s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 0m 56s trunk passed
+1 💚 mvnsite 1m 7s trunk passed
+1 💚 javadoc 1m 10s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 7s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+0 🆗 spotbugs 0m 24s branch/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 19m 55s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for patch
+1 💚 mvninstall 0m 37s the patch passed
+1 💚 compile 3m 20s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 3m 20s the patch passed
+1 💚 compile 3m 21s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 3m 21s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 56s the patch passed
+1 💚 mvnsite 1m 1s the patch passed
+1 💚 javadoc 0m 58s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 0m 54s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+0 🆗 spotbugs 0m 23s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site has no data from spotbugs
+1 💚 shadedclient 19m 51s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 ❌ unit 90m 22s /patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-server_hadoop-yarn-server-resourcemanager.txt hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 22s hadoop-yarn-site in the patch passed.
+1 💚 asflicense 0m 38s The patch does not generate ASF License warnings.
200m 8s
Reason Tests
Failed junit tests hadoop.yarn.server.resourcemanager.webapp.TestRMWebServicesCapacitySched
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7138/2/artifact/out/Dockerfile
GITHUB PR #7138
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets xmllint markdownlint
uname Linux f10a7f02a241 5.15.0-124-generic #134-Ubuntu SMP Fri Sep 27 20:20:17 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 8f477e1
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7138/2/testReport/
Max. process+thread count 951 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7138/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 35s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+0 🆗 markdownlint 0m 1s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 6 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 14m 56s Maven dependency ordering for branch
+1 💚 mvninstall 35m 37s trunk passed
+1 💚 compile 8m 11s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 7m 16s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 1m 49s trunk passed
+1 💚 mvnsite 1m 45s trunk passed
+1 💚 javadoc 1m 40s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 31s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+0 🆗 spotbugs 0m 33s branch/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 39m 15s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 32s Maven dependency ordering for patch
+1 💚 mvninstall 1m 7s the patch passed
+1 💚 compile 7m 58s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 7m 58s the patch passed
+1 💚 compile 7m 55s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 7m 55s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 59s the patch passed
+1 💚 mvnsite 1m 46s the patch passed
+1 💚 javadoc 1m 32s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 28s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+0 🆗 spotbugs 0m 28s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site has no data from spotbugs
+1 💚 shadedclient 39m 30s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 106m 54s hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 unit 0m 30s hadoop-yarn-site in the patch passed.
+1 💚 asflicense 0m 57s The patch does not generate ASF License warnings.
295m 6s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7138/3/artifact/out/Dockerfile
GITHUB PR #7138
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets xmllint markdownlint
uname Linux 5087bdb3b28c 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 0bb32d0
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7138/3/testReport/
Max. process+thread count 950 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site U: hadoop-yarn-project/hadoop-yarn
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7138/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@shameersss1
Copy link
Contributor Author

shameersss1 commented Nov 4, 2024

@slfan1989 @aajisaka @TaoYang526 Could you please review the changes ?

Note: #7129 is a blocker for this change to now in.

@TaoYang526
Copy link
Contributor

@shameersss1 Thanks for your contribution.
The PR looks good to me. The improvement in document will be helpful for users, good job!
+1

@shameersss1
Copy link
Contributor Author

@slfan1989 - Gentle reminder for the review

// disable async-scheduling for simulating complex scene
Configuration disableAsyncConf = new Configuration(conf);
disableAsyncConf.setBoolean(
CapacitySchedulerConfiguration.SCHEDULE_ASYNCHRONOUSLY_ENABLE, false);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why disable async scheduler in UT? And enable by default? I think we'd better enable async schedule by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following are the reasons why async scheduling is disabled in UT :

  1. unlike async scheduling, sync scheduling gives more flexibility while writing UTs to mimic complex scenarios since the UT writer will have full control over when to schedule, where as with async scheduling this cannot be done.

  2. There were 200+ failing when async scheduling was enabled (due to scheduling assertion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants